package com.ttn.auth.openfeign.fallback;


import com.ttn.auth.openfeign.StudentRecordFeignService;
import com.ttn.common.core.entity.Result;
import com.ttn.common.core.entity.studentrecord.StudentRecord;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

@Slf4j
public class StudentRecordFeignServiceFallbackFactory implements FallbackFactory<StudentRecordFeignService> {

    @Override
    public StudentRecordFeignService create(Throwable cause) {
        return new StudentRecordFeignService() {

            @Override
            public Result serviceQueryStudentLogin(StudentRecord studentRecord) {
                log.info("远程调用报错");
                return Result.fail();
            }

            @Override
            public Result<StudentRecord> queryStudentRecordByOpenId(String openid) {
                return null;
            }

        };
    }
}
